package com.baizhi.contorller;



import com.baizhi.eneity.User;
import com.baizhi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


@RestController
@CrossOrigin
public class UserContorller {
    @Autowired
    private UserService userService;

    @PostMapping("query")
    public int login(@RequestBody User user){
        System.out.println(user);
        int result=userService.login(user);
        System.out.println(result);
        return result;
    }


}
